home *** CD-ROM | disk | FTP | other *** search
- Path: news.microsoft.com!news
- From: jparker@wolfenet.com (J Parker)
- Newsgroups: comp.lang.c
- Subject: Help: need to read a file name from a file and pass to func. to open another file
- Date: 7 Feb 1996 08:35:48 GMT
- Organization: Microsoft Corporation
- Message-ID: <4f9o94$s5v@news.microsoft.com>
- NNTP-Posting-Host: 157.54.18.88
- Mime-Version: 1.0
- X-Newsreader: WinVN 0.93.14
-
- Need help:
-
- I know what your thinking but I'm really an operator not a developer, and
- I work grave so no around here at the time programs anything but maybe
- VB (uhgg.. ;-) ).
-
- I'm trying to read a file full of file names, extract each name, pass one
- name at a time to a function which opens the file and extracts info.
- Both files are ascii. In the first part, I read the file and put the
- file names into a 2 dimension character array. I then call the function,
- passing one row at a time in a loop till all the files have been read.
-
- The problem is that when I pass what has now effectively become a char
- string to the function, fopen() blows chunks on the "\0" character that C
- places at the endof all char strings. (I've deduced this from debugging
- code placed in the source, I may be way off here, comments ...)
-
- I've tried every way I can come up with to strip off the "\0" from the
- end of the string, plus every reference in every manual I own... Nothing
- seems to work. Any comments, suggestions, code fragments are greatly
- appreciated.
-
- Would appreciate mail,since it's hard to keep caught up on the news
- groups. Also if you need to see my source please mail.
-
- Thanks in advance
- a-herbp@microsoft.com
- jparker@wolfent.com
- --
- The opinions expressed in this message are my own personal views
- and do not reflect the official views of Microsoft Corporation.
-
-